package com.sgcc.statistics.service.impl;

import java.util.List;

import com.sgcc.statistics.domain.IndicatorExecutionDto;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.sgcc.statistics.mapper.OSgappStatMapper;
import com.sgcc.statistics.domain.OSgappStat;
import com.sgcc.statistics.service.IOSgappStatService;

/**
 * 网上国网日报Service业务层处理
 * 
 * @author sgcc
 * @date 2021-04-14
 */
@Service
public class OSgappStatServiceImpl implements IOSgappStatService 
{
    @Autowired
    private OSgappStatMapper oSgappStatMapper;

    /**
     * 查询网上国网日报
     * 
     * @param id 网上国网日报ID
     * @return 网上国网日报
     */
    @Override
    public OSgappStat selectOSgappStatById(String id)
    {
        return oSgappStatMapper.selectOSgappStatById(id);
    }

    /**
     * 查询网上国网日报列表
     * 
     * @param oSgappStat 网上国网日报
     * @return 网上国网日报
     */
    @Override
    public List<OSgappStat> selectOSgappStatList(OSgappStat oSgappStat)
    {
        return oSgappStatMapper.selectOSgappStatList(oSgappStat);
    }

    /**
     * 新增网上国网日报
     * 
     * @param oSgappStat 网上国网日报
     * @return 结果
     */
    @Override
    public int insertOSgappStat(OSgappStat oSgappStat)
    {
        return oSgappStatMapper.insertOSgappStat(oSgappStat);
    }

    /**
     * 修改网上国网日报
     * 
     * @param oSgappStat 网上国网日报
     * @return 结果
     */
    @Override
    public int updateOSgappStat(OSgappStat oSgappStat)
    {
        return oSgappStatMapper.updateOSgappStat(oSgappStat);
    }

    /**
     * 批量删除网上国网日报
     * 
     * @param ids 需要删除的网上国网日报ID
     * @return 结果
     */
    @Override
    public int deleteOSgappStatByIds(String[] ids)
    {
        return oSgappStatMapper.deleteOSgappStatByIds(ids);
    }

    /**
     * 删除网上国网日报信息
     * 
     * @param id 网上国网日报ID
     * @return 结果
     */
    @Override
    public int deleteOSgappStatById(String id)
    {
        return oSgappStatMapper.deleteOSgappStatById(id);
    }

    @Override
    public OSgappStat getOsgappStatByUnit(String orgNo,String endStartTime, String endTime) {
        return oSgappStatMapper.getOsgappStatByUnit(orgNo, endStartTime, endTime);
    }

    @Override
    public IndicatorExecutionDto implementationIndicators(List<String> orgNoList, String starttime,String endtime) {
        return oSgappStatMapper.implementationIndicators(orgNoList,starttime,endtime);
    }

    @Override
    public OSgappStat getOsgappStatByUnitList(List<String> orgNoList, String lastYearstrTime, String lastYearendTime) {
        return oSgappStatMapper.getOsgappStatByUnitList(orgNoList, lastYearstrTime, lastYearendTime);
    }

    @Override
    public OSgappStat countNewNumByUnit(String unit, String strTime, String eTime) {
        return oSgappStatMapper.countNewNumByUnit(unit, strTime, eTime);
    }

    @Override
    public OSgappStat getOsgappStatAndOpowerRateByUnit(String deptId, String sTime, String eTime) {
        return oSgappStatMapper.getOsgappStatAndOpowerRateByUnit(deptId,sTime,eTime);
    }
}
